package org.jeecg.modules.cdkey.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * 兑换码
 *
 * @author thankgod7
 * @version V1.0
 * @date 2022-01-14
 */
@Data
@TableName("ao_cdkey")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "ao_cdkey对象", description = "兑换码")
public class AoCdkey implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
    private String id;
    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    private String createBy;
    /**
     * 创建日期
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建日期")
    private Date createTime;
    /**
     * 更新人
     */
    @ApiModelProperty(value = "更新人")
    private String updateBy;
    /**
     * 更新日期
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新日期")
    private Date updateTime;
    /**
     * 所属部门
     */
    @ApiModelProperty(value = "所属部门")
    private String sysOrgCode;
    /**
     * 激活码
     */
    @Excel(name = "激活码", width = 15)
    @ApiModelProperty(value = "激活码")
    private String code;
    /**
     * 对应题库分类
     */
    @Excel(name = "对应题库分类", width = 15, dictTable = "ao_category", dicText = "name", dicCode = "code")
    @Dict(dictTable = "ao_category", dicText = "name", dicCode = "code")
    @ApiModelProperty(value = "对应题库分类")
    private String categoryId;
    /**
     * 所属用户
     */
    @Excel(name = "所属用户", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
    @Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
    @ApiModelProperty(value = "所属用户")
    private String owner;
    /**
     * 激活人
     */
    @Excel(name = "激活人", width = 15)
    @ApiModelProperty(value = "激活人")
    private String activeUser;
    /**
     * 激活时间
     */
    @Excel(name = "激活时间", width = 15, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "激活时间")
    private Date activeTime;
    /**
     * 状态
     */
    @Excel(name = "状态", width = 15, dicCode = "cdkey_status")
    @Dict(dicCode = "cdkey_status")
    @ApiModelProperty(value = "状态")
    private String status;
}
